//
//  GouDetailsViewController.m
//  JinChengYun
//
//  Created by 金橙云 on 2017/3/3.
//  Copyright © 2017年 金橙云. All rights reserved.
//

#import "GouDetailsViewController.h"
#import "DouDetailsCell.h"
#import "DouSecondCell.h"
@interface GouDetailsViewController ()<UITableViewDataSource,UITableViewDelegate>
{
    NSArray *_titlArr;
}
@property(nonatomic,strong)UITableView *tabView;
@end

@implementation GouDetailsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"我的认购";
    _titlArr = @[@"认购姓名 :",@"联系电话 :",@"身份证号:",@"身份证地址:",@"认购时间 :",@"认购房源 :",@"缴纳定金 :",@"销售面积 :",@"销售表价 :",@"表价总价 :",@"案场优惠 :",@"协议总价 :",@"协议单价 :",@"特别优惠 :",@"合同总价 :",@"合同单价 :", @"付款方式 :",@"应缴首付 :",@"贷款金额 :",@"贷款类型 :",@"实缴首付 :",@"总欠首付 :",@"首付状态 :",@"代收费用状态 :",@"签约状态 :"];
    _tabView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, B_WIDTH, B_HEIGHT) style:UITableViewStylePlain];
    _tabView.delegate = self;
    _tabView.dataSource = self;
    _tabView.rowHeight = 44;

    //self.tabView.separatorStyle = UITableViewCellSeparatorStyleNone;
    [self.view addSubview:_tabView];
    
    
    
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return _titlArr.count;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
     static NSString *cellIndent = @"";
    if (indexPath.row == 1)
    {
        cellIndent = @"CellA";
       // DouSecondCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIndent];
        DouSecondCell *cell = [tableView cellForRowAtIndexPath:indexPath];
        if (cell ==nil)
        {
            cell = [[DouSecondCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIndent];
            cell.textLabel.text = _titlArr[indexPath.row];
        }
        [cell setSelectionStyle:UITableViewCellSelectionStyleNone];//取消点击
        return cell;

    }
    else
    {
        cellIndent = @"CellB";
        //DouDetailsCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIndent];
        DouDetailsCell *cell = [tableView cellForRowAtIndexPath:indexPath];
        if (cell ==nil)
        {
            cell = [[DouDetailsCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIndent];
            cell.textLabel.text = _titlArr[indexPath.row];
        }
        [cell setSelectionStyle:UITableViewCellSelectionStyleNone];//取消点击
        return cell;
        
    }

}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
